﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using Sripirom.ATS.Core.Messaging;

namespace Sripirom.ATS.Services.API.FundTransfer.Messages
{
    [MessageContract(WrapperNamespace = "http://www.kiatnakinbank.com/services/ATS/IFundTransferService/FundTransfer/RequestMessage")]
    public class FundTransferRequest : ChannelRequest, IChannelRequest
    {

        private FundTransferBodyRequest _body;
        public FundTransferRequest()
        {
            _body = new FundTransferBodyRequest();
        }

        [MessageBodyMember(Name = "Body", Namespace = "http://www.kiatnakinbank.com/services/ATS/IFundTransferService/FundTransfer/RequestMessage/Body")]
        public FundTransferBodyRequest Body { get { return _body; } set { _body = value; } }
   
    }


    #region ====== Body Contract ========================================================================================================
    [DataContract(Name = "Body", Namespace = "http://www.kiatnakinbank.com/services/ATS/IFundTransferService/FundTransfer/RequestMessage/Body")]
    public class FundTransferBodyRequest
    {
        /// <summary>
        /// [M] length 1
        /// </summary>
        [DataMember(Order = 1)]
        public String Action { get; set; } // E	Example : E = Excute

        [DataMember(Order = 2)]
        public String EffectiveDate { get; set; }
        /// <summary>
        /// [O] length 22,2
        /// </summary>
        [DataMember(Order = 3)]
        public Decimal? TransAmountAccum { get; set; }
        /// <summary>
        /// [O] length 22,2
        /// </summary>
        [DataMember(Order = 4)]
        public Decimal? TransCountAccum { get; set; }
        /// <summary>
        /// [M] length 22,2
        /// </summary>
        [DataMember(Order = 5, IsRequired = true)]
        public Decimal TransAmount { get; set; }
        /// <summary>
        /// [O] length 2
        /// </summary>
        [DataMember(Order = 6)]
        public String TransferType { get; set; }
        /// <summary>
        /// [M] length 6
        /// </summary>
        [DataMember(Order = 7)]
        public String CompanyCode { get; set; }
        /// <summary>
        /// [M] length 3
        /// </summary>
        [DataMember(Order = 8)]
        public String ServiceCode { get; set; }
        /// <summary>
        /// [M] length 3
        /// </summary>
        [DataMember(Order = 9)]
        public String SubServiceCode { get; set; }
        /// <summary>
        /// [M] length 4
        /// </summary>
        [DataMember(Order = 10)]
        public String OrderingBranch { get; set; }
        /// <summary>
        /// [M] length 3
        /// </summary>
        [DataMember(Order = 11)]
        public String PayCurrency { get; set; }

     
        /// <summary>
        /// [O] length 200
        /// </summary>
        [DataMember(Order = 20)]
        public String Remark { get; set; }
        /// <summary>
        /// [O] length 100
        /// </summary>
        [DataMember(Order = 21)]
        public String UserId { get; set; }

        public FundTransferBodyRequest()
        {

        }


    }


    #endregion ====================================================================================================================


}
